home *** CD-ROM | disk | FTP | other *** search
/ Apple WWDC 1996 / WWDC96_1996 (CD).toast / Technology Materials / MacOS 8 Resources / Developer Tools / Mac OS 8 Interfaces & Libraries / Interfaces / PInterfaces / Telephones.p < prev    next >
Text File  |  1996-05-01  |  45KB  |  901 lines

  1. {
  2.      File:        Telephones.p
  3.  
  4.      Contains:    Telephone Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0d3 on Copland DR1
  8.  
  9.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  10.  
  11.      Bugs?:        If you find a problem with this file, send the file and version
  12.                  information (from above) and the problem description to:
  13.  
  14.                      Internet:    apple.bugs@applelink.apple.com
  15.                      AppleLink:    APPLE.BUGS
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Telephones;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __TELEPHONES__}
  28. {$SETC __TELEPHONES__ := 1}
  29.  
  30. {$I+}
  31. {$SETC TelephonesIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __WINDOWS__}
  38. {$I Windows.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __DIALOGS__}
  41. {$I Dialogs.p}
  42. {$ENDC}
  43. {$IFC UNDEFINED __ERRORS__}
  44. {$I Errors.p}
  45. {$ENDC}
  46. {$IFC UNDEFINED __EVENTS__}
  47. {$I Events.p}
  48. {$ENDC}
  49. {$IFC UNDEFINED __CTBUTILITIES__}
  50. {$I CTBUtilities.p}
  51. {$ENDC}
  52. {$IFC UNDEFINED __COMPONENTS__}
  53. {$I Components.p}
  54. {$ENDC}
  55.  
  56. {$PUSH}
  57. {$ALIGN MAC68K}
  58. {$LibExport+}
  59.  
  60. {$IFC FOR_SYSTEM7_ONLY }
  61.  
  62. CONST
  63.     curTELVersion                = 3;                            {  current Telephone Manager version  }
  64.                                                                 {     the chooseXXX symbols are defined in CTBUtilities.(pah)  }
  65.     telChooseDisaster            = -2;
  66.     telChooseFailed                = -1;
  67.     telChooseAborted            = 0;
  68.     telChooseOKMinor            = 1;
  69.     telChooseOKMajor            = 2;
  70.     telChooseCancel                = 3;
  71.     telChooseOKTermChanged        = 4;
  72.  
  73. {$ENDC}
  74. {$IFC FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE }
  75. {$IFC UNDEFINED classTEL }
  76.  
  77. CONST
  78.                                                                 {  telephone tool file type  }
  79.     classTEL                    = 'vbnd';
  80.  
  81. {$ENDC}
  82.  
  83. CONST
  84.                                                                 {  PHYSICAL TERMINAL CONSTANTS  }
  85.                                                                 {  INDEPENDENT HANDSET CONSTANTS  }
  86.     telIndHSOnHook                = 0;                            {  independent handset on hook  }
  87.     telIndHSOffHook                = 1;                            {  independent handset off hook  }
  88.     telIndHSDisconnected        = 0;                            {  handset disconnected from the line  }
  89.     telIndHSConnected            = 1;                            {  handset connected to the line  }
  90.                                                                 {  HOOK STATE CONSTANTS  }
  91.     telHandset                    = 1;                            {  handset hookswitch  }
  92.     telSpeakerphone                = 2;                            {  speakerphone 'on' switch  }
  93.     telDeviceOffHook            = 1;                            {  device off hook  }
  94.     telDeviceOnHook                = 0;                            {  device on hook  }
  95.                                                                 {  VOLUME CONTROL CONSTANTS  }
  96.     telHandsetSpeakerVol        = 1;                            {  volume of the handset speaker  }
  97.     telHandsetMicVol            = 2;                            {  sensitivity of the handset mic  }
  98.     telSpeakerphoneVol            = 3;                            {  speakerphone volume  }
  99.     telSpeakerphoneMicVol        = 4;                            {  sensitivity of the spkrphone mic  }
  100.     telRingerVol                = 5;                            {  volume of the ringer  }
  101.     telBuiltinSPVol                = 6;                            {  volume of the built-in speakerphone  }
  102.     telBuiltinSPMicVol            = 7;                            {  sensitivity of the built-in speakerphone mic  }
  103.     telVolSame                    = 0;                            {  leaves the volume at previous level  }
  104.     telVolMin                    = 1;                            {  turns volume down to minimum level, but not off  }
  105.     telVolMax                    = 100;                            {  highest level allowed by the Telephone Manager  }
  106.     telVolStateSame                = 0;                            {  leaves device in same state  }
  107.     telVolStateOff                = 1;                            {  turns the device off ,  }
  108.                                                                 {  but doesn't change the volume setting.  }
  109.                                                                 {  Use for mute functions.  }
  110.     telVolStateOn                = 2;                            {  turns the device on.  Volume setting is  }
  111.                                                                 {  the same as previously set. }
  112.                                                                 {  DISPLAY CONSTANTS  }
  113.     telNormalDisplayMode        = 1;                            {  normal display mode  }
  114.     telInspectMode                = 2;                            {  inspect display mode  }
  115.     telMiscMode                    = 3;                            {  miscellaneous display mode  }
  116.     telRetrieveMode                = 4;                            {  message retrieval mode  }
  117.     telDirectoryQueryMode        = 5;                            {  electronic directory mode  }
  118.     telEntireDisplay            = 0;                            {  entire Display  }
  119.                                                                 {  KEY PRESS CONSTANTS  }
  120.     telHangupKey                = 1;                            {  drop, or release, key pressed  }
  121.     telHoldKey                    = 2;                            {  hold key pressed  }
  122.     telConferenceKey            = 3;                            {  conference key pressed  }
  123.     telTransferKey                = 4;                            {  transfer key pressed  }
  124.     telForwardKey                = 5;                            {  call forward key pressed  }
  125.     telCallbackKey                = 6;                            {  call back key pressed  }
  126.     telDNDKey                    = 7;                            {  do not disturb key pressed  }
  127.     telCallPickupKey            = 8;                            {  call Pickup key pressed  }
  128.     telCallParkKey                = 9;                            {  call Park key pressed  }
  129.     telCallDeflectKey            = 10;                            {  call Deflect key pressed  }
  130.     telVoiceMailAccessKey        = 11;                            {  voice Mail Access key pressed  }
  131.     telCallRejectKey            = 12;                            {  call Reject key pressed  }
  132.     telOtherKey                    = 16;                            {  other key pressed  }
  133.     telKeyPadPress                = 1;                            {  key pressed on 12 digit keypad }
  134.     telFeatureKeyPress            = 2;                            {  feature Key Pressed  }
  135.     telTerminalEnabled            = 0;
  136.     telTerminalDisabled            = 1;
  137.     telUnknown                    = 0;                            {  unknown error  }
  138.     telTerminalHWDisconnected    = 1;                            {  terminal hardware is disconnected  }
  139.     telDeviceDriverClosed        = 2;                            {  device driver is closed  }
  140.                                                                 {  ALERT PATTERN  }
  141.     telPattern0                    = 0;
  142.     telPattern1                    = 1;
  143.     telPattern2                    = 2;
  144.     telPattern3                    = 3;
  145.     telPattern4                    = 4;
  146.     telPattern5                    = 5;
  147.     telPattern6                    = 6;
  148.     telPattern7                    = 7;
  149.     telPatternOff                = 8;
  150.     telPatternUndefined            = 15;                            {  DN TYPES  }
  151.     telAllDNs                    = 0;                            {  counts all types of DNs  }
  152.     telInternalDNs                = 1;                            {  connected to PBX or other non-public switch  }
  153.     telInternalDNsOnly            = 2;                            {  connected to PBX or other non-public switch  }
  154.                                                                 {  and able to place internal calls only  }
  155.     telExternalDNs                = 3;                            {  connected to public network  }
  156.     telDNTypeUnknown            = 4;                            {  DN type unknown  }
  157.                                                                 {  DN USAGE  }
  158.     telDNNotUsed                = 0;                            {  DN is not used - onhook  }
  159.     telDNPOTSCall                = 1;                            {  DN used for POTs call  }
  160.     telDNFaxCall                = 2;                            {  DN used for fax call  }
  161.     telDNDataCall                = 3;                            {  DN used for data call  }
  162.     telDNAlerting                = 4;                            {  Incoming call at DN  }
  163.     telDNUnknownState            = 5;                            {  DN is in unknown state  }
  164.                                                                 {  CALL FORWARDING TYPES  }
  165.     telForwardImmediate            = 1;                            {  immediately forward calls  }
  166.     telForwardBusy                = 2;                            {  forward on Busy  }
  167.     telForwardNoAnswer            = 3;                            {  forward on No answer  }
  168.     telForwardBusyNA            = 4;                            {  forwarding for busy and no answer }
  169.     telForwardTypeUnknown        = 5;                            {  type of forwarding is unknown  }
  170.                                                                 {  CALL FORWARDING MESSAGES  }
  171.     telForwardCleared            = 0;                            {  forwarding has been cleared  }
  172.     telForwardEst                = 1;                            {  forwarding has been established }
  173.     telForwardFailed            = 2;                            {  attempt to setup forwarding has failed }
  174.                                                                 {  DO NOT DISTURB TYPES  }
  175.     telDNDIntExt                = 0;                            {  do not disturb for all internal and external calls }
  176.     telDNDExternal                = 1;                            {  do not disturb for external calls only  }
  177.     telDNDInternal                = 2;                            {  do not disturb for internal calls only  }
  178.     telDNDNonIntercom            = 3;                            {  do not disturb for all calls except intercom  }
  179.                                                                 {  DO NOT DISTURB MESSAGES  }
  180.     telDNDCleared                = 0;                            {  do not disturb has been cleared  }
  181.     telDNDEst                    = 1;                            {  do not disturb has been established  }
  182.     telDNDFailed                = 2;                            {  attempt to setup do not disturb has failed  }
  183.                                                                 {  VOICE MAIL MESSAGES  }
  184.     telAllVoiceMessagesRead        = 0;                            {  all messages have been read, none are  waiting  }
  185.                                                                 {  to be read  }
  186.     telNewVoiceMessage            = 1;                            {  a new message has arrived or messages are waiting  }
  187.                                                                 {  for this DN  }
  188.                                                                 {  DNSELECT MESSAGE  }
  189.     telDNDeselected                = 0;                            {  DN has been deselected  }
  190.     telDNSelected                = 1;                            {  DN has been selected  }
  191.                                                                 {  CALL ORIGINATORS  }
  192.     telInternalCall                = 0;                            {  return nth internal CA  }
  193.     telExternalCall                = 1;                            {  return nth external CA  }
  194.     telUnknownCallOrigin        = 2;                            {  unknown call type  }
  195.     telAllCallOrigins            = 2;                            {  return nth CA internal or external  }
  196.                                                                 {  CALL TYPES  }
  197.     telVoiceMailAccessOut        = -7;
  198.     telPageOut                    = -6;
  199.     telIntercomOut                = -5;
  200.     telCallbackOut                = -4;
  201.     telPickup                    = -3;
  202.     telParkRetrieve                = -2;
  203.     telNormalOut                = -1;
  204.     telUnknownCallType            = 0;
  205.     telNormalIn                    = 1;
  206.     telForwardedImmediate        = 2;
  207.     telForwardedBusy            = 3;
  208.     telForwardedNoAnswer        = 4;
  209.     telTransfer                    = 5;
  210.     telDeflected                = 6;
  211.     telIntercepted                = 7;
  212.     telDeflectRecall            = 8;
  213.     telParkRecall                = 9;
  214.     telTransferredRecall        = 10;
  215.     telIntercomIn                = 11;
  216.     telCallbackIn                = 12;                            {  DIAL TYPES  }
  217.     telDNDialable                = 0;                            {  this DN could be dialed via TELSetupCall  }
  218.     telDNNorthAmerican            = 1;                            {  rmtDN is standard North America 10 digit number  }
  219.     telDNInternational            = 2;                            {  rmtDN is an international number  }
  220.     telDNAlmostDialable            = 3;                            {  rmtDN is almost dialable,  }
  221.                                                                 {  missing prefix such as 9 or 1  }
  222.     telDNUnknown                = 15;                            {  unknown whether DN is dialable  }
  223.                                                                 {  CALL PROGRESS MESSAGES  }
  224.     telCAPDialTone                = 1;                            {  dial tone  }
  225.     telCAPRinging                = 2;                            {  destination CA is alerting  }
  226.     telCAPDialing                = 3;                            {  dialing the other end  }
  227.     telCAPReorder                = 4;                            {  reorder  }
  228.     telCAPBusy                    = 5;                            {  busy  }
  229.     telCAPRouted                = 6;                            {  call routed; rmtDN will hold the routing directory  }
  230.                                                                 {  number routeDN and routePartyName have been updated  }
  231.     telCAPRoutedOff                = 7;                            {  call routed off-network; no further progress will  }
  232.                                                                 {  be available  }
  233.     telCAPTimeout                = 8;                            {  call timed out  }
  234.     telCAPUpdate                = 9;                            {  name and rmtDN information has been updated  }
  235.     telCAPPrompt                = 10;                            {  the network is prompting for more information  }
  236.     telCAPWaiting                = 11;                            {  call is proceeding, but there is no response yet  }
  237.                                                                 {  from the destination  }
  238.     telCAPCPC                    = 12;                            {  telephone tool detected CPC signal  }
  239.     telCAPNoDialTone            = 13;                            {  dial tone not detected  }
  240.     telCAPUnknown                = 15;                            {  call progress state unknown  }
  241.     telCAPDialDisabled            = 16;                            {  Blacklisting: Dial Disabled  }
  242.     telCAPBlacklistedNumber        = 17;                            {  Blacklisting: Blacklisted Number  }
  243.     telCAPForbiddenNumber        = 18;                            {  Blacklisting: Forbidden Number  }
  244.     telCAPModemGuardTime        = 19;                            {  Modem Guard Timein force, unable to dial  }
  245.     telCAPLCDetected            = 20;                            {  trying to dial a number while the handset is offhook  }
  246.     telCAPLostLC                = 21;                            {  trying manual dial or answer while handset not off hook  }
  247.                                                                 {  or also lost line current during dialing.  }
  248.                                                                 {  OUTGOING CALL MESSAGES  }
  249.     telPhysical                    = 0;                            {  user lifted handset and initiated call  }
  250.     telProgrammatic                = 1;                            {  programmatic initiation of outgoing call  }
  251.                                                                 {  DISCONNECT MESSAGES  }
  252.     telLocalDisconnect            = 0;                            {  local party, this user, responsible for disconnect  }
  253.     telRemoteDisconnect            = 1;                            {  remote party responsible for disconnect  }
  254.                                                                 {  DISCONNECT TYPES  }
  255.     telCADNormal                = 1;                            {  normal disconnect  }
  256.     telCADBusy                    = 2;                            {  remote user busy  }
  257.     telCADNoResponse            = 3;                            {  remote not responding  }
  258.     telCADRejected                = 4;                            {  call rejected  }
  259.     telCADNumberChanged            = 5;                            {  number changed  }
  260.     telCADInvalidDest            = 6;                            {  invalid destination address  }
  261.     telCADFacilityRejected        = 7;                            {  requested facility rejected  }
  262.     telCADUnobtainableDest        = 9;                            {  destination not obtainable  }
  263.     telCADCongested                = 10;                            {  network congestion  }
  264.     telCADIncompatibleDest        = 11;                            {  incompatible destination  }
  265.     telCADTimeout                = 12;                            {  call timed out  }
  266.     telCADUnknown                = 15;                            {  reason unknown  }
  267.                                                                 {  CONFERENCE MESSAGES  }
  268.     telConferencePrepFailed        = 0;                            {  conference could not be prepared  }
  269.     telConferencePending        = 1;                            {  conference prepared successfully  }
  270.     telConferenceEstFailed        = 2;                            {  conference could not be established  }
  271.     telConferenceEst            = 3;                            {  conference established  }
  272.                                                                 {  TRANSFER MESSAGES  }
  273.     telTransferPrepFailed        = 0;                            {  transfer could not be prepared  }
  274.     telTransferPending            = 1;                            {  transfer prepared successfully  }
  275.     telTransferEst                = 2;                            {  consult or blind xfer successful  }
  276.     telTransferFailed            = 3;                            {  consult or blind xfer failed  }
  277.     telTransferred                = 4;                            {  message to originator of CA specifying  }
  278.                                                                 {  that call was transferred to rmtDN  }
  279.                                                                 {  HOLD MESSAGES  }
  280.     telHoldCleared                = 0;
  281.     telHoldEst                    = 1;
  282.     telHoldFailed                = 2;                            {  RECEIVE DIGIT MESSAGES  }
  283.     telDigitAudible                = 0;
  284.     telDigitNotAudible            = 1;                            {  CALL PARK MESSAGES  }
  285.     telCallParkEst                = 1;                            {  call has been successfully parked  }
  286.     telCallParkRetrieveEst        = 2;                            {  parked Call has been successfully retrieved  }
  287.     telCallParkFailed            = 3;                            {  attempt to setup call park has failed  }
  288.     telCallParkRetrieveFailed    = 4;                            {  attempt to retrieve parked call failed  }
  289.     telCallParkRecall            = 5;                            {  call park has been recalled  }
  290.                                                                 {  CALL BACK MESSAGES  }
  291.     telCallbackCleared            = 0;                            {  call back has been cleared  }
  292.     telCallbackEst                = 1;                            {  call back has been established  }
  293.     telCallbackNowAvail            = 2;                            {  call can be called back with TELCallBackNow  }
  294.                                                                 {  if CA is zero, else call IS calling back on CA  }
  295.     telCallbackFailed            = 3;                            {  attempt to setup callback has failed  }
  296.     telCallbackDesired            = 4;                            {  a user has called this terminal, received no  }
  297.                                                                 {  answer and desires this terminal to call it  }
  298.                                                                 {  back  }
  299.     telCallbackDesiredCleared    = 5;                            {  call back for no answer no longer desired  }
  300.     telCalledback                = 6;                            {  callback has occurred successfully  }
  301.                                                                 {  CALL REJECT MESSAGES  }
  302.     telCallRejectFailed            = 0;                            {  attempt to reject call has failed  }
  303.     telCallRejectEst            = 1;                            {  call successfully rejected  }
  304.     telCallRejected                = 2;                            {  message to originator that call was rejected  }
  305.                                                                 {  CALL DEFLECT MESSAGES  }
  306.     telCallDeflectFailed        = 0;                            {  attempt to deflect call has failed  }
  307.     telCallDeflectEst            = 1;                            {  call successfully deflected  }
  308.     telCallDeflectRecall        = 2;                            {  deflected call has been recalled  }
  309.     telCallDeflected            = 3;                            {  message to originator that call was deflected  }
  310.                                                                 {  to rmtDN  }
  311.     telAutoDeflectImmediate        = 4;                            {  a call was automatically deflected from this  }
  312.                                                                 {  terminal as a result of immediate call  }
  313.                                                                 {  forwarding  }
  314.     telAutoDeflectBusy            = 5;                            {  a call was automatically deflected from this  }
  315.                                                                 {  terminal as a result of call forwarding on busy  }
  316.     telAutoDeflectNoAnswer        = 6;                            {  a call was automatically deflected from this  }
  317.                                                                 {  terminal as a result of call forwarding on  }
  318.                                                                 {  no answer  }
  319.                                                                 {  CONFERENCE SPLIT MESSAGES  }
  320.     telConferenceSplitFailed    = 0;                            {  CA could not be split  }
  321.     telConferenceSplitEst        = 1;                            {  CA split successfully  }
  322.                                                                 {  CONFERENCE DROP MESSAGES  }
  323.     telConferenceDropFailed        = 0;                            {  CA could not be dropped  }
  324.     telConferenceDropped        = 1;                            {  CA dropped successfully  }
  325.                                                                 {  CALL PICKUP MESSAGES  }
  326.     telCallPickupEst            = 0;                            {  call pickup was successful  }
  327.     telCallPickupFailed            = 1;                            {  call pickup failed  }
  328.     telCallPickedUp                = 2;                            {  message to originator that call was picked  }
  329.                                                                 {  up at a different DN  }
  330.                                                                 {  PAGING MESSAGES  }
  331.     telPageEst                    = 0;                            {  paging was successful  }
  332.     telPageComplete                = 1;                            {  paging activity completed  }
  333.     telPageFailed                = 2;                            {  paging failed  }
  334.                                                                 {  INTERCOM MESSAGES  }
  335.     telIntercomEst                = 0;                            {  intercom was successful  }
  336.     telIntercomComplete            = 1;                            {  intercom activity completed  }
  337.     telIntercomFailed            = 2;                            {  intercom failed  }
  338.                                                                 {  MODEM TONE MESSAGES  }
  339.     telModemToneDetected        = 0;                            {  modem tone was detected  }
  340.     telModemToneCleared            = 1;                            {  modem tone went away  }
  341.                                                                 {  FAX TONE MESSAGES  }
  342.     telFaxToneDetected            = 0;                            {  fax tone was detected  }
  343.     telFaxToneCleared            = 1;                            {  fax tone went away  }
  344.                                                                 {  IN USE MESSAGES  }
  345.     telInUsePrivate                = 0;                            {  MADN is in use and can't be accessed  }
  346.     telInUseCanAccess            = 1;                            {  MADN is in use, and others can access it  }
  347.                                                                 {  and join in  }
  348.     telInUseCanMakePrivate        = 2;                            {  MADN is in use, but available for any one  }
  349.                                                                 {  person to access  }
  350.     telInUseCleared                = 3;                            {  MADN is no longer in use  }
  351.                                                                 {  CALL APPEARANCE STATES  }
  352.     telCAIdleState                = 0;                            {  a call doesn't exist at this time  }
  353.     telCAInUseState                = 1;                            {  the call is active but at another terminal  }
  354.     telCAOfferState                = 2;                            {  a call is being offered to the terminal  }
  355.     telCAQueuedState            = 3;                            {  a call is being queued at this terminal  }
  356.     telCAAlertingState            = 4;                            {  a call is alerting at the terminal  }
  357.     telCADialToneState            = 5;                            {  initiated outgoing call has dialtone  }
  358.     telCADialingState            = 6;                            {  initiated outgoing call is dialing  }
  359.     telCAWaitingState            = 7;                            {  initiated outgoing call is waiting for  }
  360.                                                                 {  response from destination  }
  361.     telCARingingState            = 8;                            {  the outgoing call is ringing.  }
  362.     telCABusyState                = 9;                            {  destination is busy or can't be reached  }
  363.     telCAHeldState                = 10;                            {  call has been put on hold by this terminal  }
  364.     telCAConferencedState        = 11;                            {  this CA is part of a conference now  }
  365.     telCAActiveState            = 12;                            {  the call is active and parties are free  }
  366.                                                                 {  to exchange data  }
  367.     telCAReorderState            = 13;                            {  CA is in a reorder state  }
  368.     telCAConferencedHeldState    = 14;                            {  CA is a conference call in a held state  }
  369.     telCAUnknownState            = 15;                            {  the call state is unknown  }
  370.                                                                 {  TERMINAL MESSAGE EVENTMASKS  }
  371.     telTermHookMsg                = $00000001;                    {  the hookswitch state has changed  }
  372.     telTermKeyMsg                = $00000002;                    {  a phone pad key has been depressed  }
  373.     telTermVolMsg                = $00000004;                    {  volume setting has changed  }
  374.     telTermDisplayMsg            = $00000008;                    {  display has changed  }
  375.     telTermEnableMsg            = $00000010;                    {  terminal has become enabled  }
  376.     telTermOpenMsg                = $00000020;                    {  terminal has been opened  }
  377.     telTermCloseMsg                = $00000040;                    {  terminal is shutting down  }
  378.     telTermResetMsg                = $00000080;                    {  terminal has been reset  }
  379.     telTermErrorMsg                = $00000100;                    {  hard equipment error  }
  380.     telTermIndHSStateChgMsg        = $00000200;                    {  change in handset state from inacive to  }
  381.                                                                 {  active or vice versa  }
  382.     telTermIndHSConnectMsg        = $00000400;                    {  independent handset connection has been changed  }
  383.     telTermKeyImmMsg            = $00000800;                    {  immidiate arrival of phone pad key  }
  384.     telTermVolStateMsg            = $00001000;                    {  volume state has changed  }
  385.     telTermOtherMsg                = $80000000;                    {  vendor defined error  }
  386.     telAllTermMsgs                = $00001FFF;                    {  mask to all non tool specific terminal events  }
  387.                                                                 {  DN MESSAGE EVENTMASK CONSTANTS  }
  388.     telDNForwardMsg                = $00000001;                    {  forward feature activity  }
  389.     telDNDNDMsg                    = $00000002;                    {  do not disturb feature activity  }
  390.     telDNVoiceMailMsg            = $00000004;                    {  message has arrived for this DN  }
  391.     telDNSelectedMsg            = $00000008;                    {  DN has been selected or deselected  }
  392.     telDNOtherMsg                = $80000000;                    {  a custom message for use by tools  }
  393.     telAllDNMsgs                = $0000000F;                    {  mask to all non tool specific dn events  }
  394.                                                                 {  CA MESSAGE EVENTMASK CONSTANTS  }
  395.     telCAAlertingMsg            = $00000001;                    {  CA is alerting   }
  396.     telCAOfferMsg                = $00000002;                    {  CA is being offered a call  }
  397.     telCAProgressMsg            = $00000004;                    {  call progress info for this CA  }
  398.     telCAOutgoingMsg            = $00000008;                    {  CA is initiating an outgoing call  }
  399.     telCADisconnectMsg            = $00000010;                    {  CA disconnected (dropped or rmt disc  }
  400.     telCAActiveMsg                = $00000020;                    {  CA is active and voice/data is free  }
  401.                                                                 {  to flow end to end  }
  402.     telCAConferenceMsg            = $00000040;                    {  conference activity on CA  }
  403.     telCATransferMsg            = $00000080;                    {  transfer feature activity  }
  404.     telCAHoldMsg                = $00000100;                    {  hold feature activity  }
  405.     telCADigitsMsg                = $00000200;                    {  remote signaling digits arrived  }
  406.     telCACallParkMsg            = $00000400;                    {  CA call park feature activity  }
  407.     telCACallbackMsg            = $00000800;                    {  CA call back feature activity   }
  408.     telCARejectMsg                = $00001000;                    {  CA is rejected  }
  409.     telCADeflectMsg                = $00002000;                    {  CA is deflected  }
  410.     telCAForwardMsg                = $00004000;                    {  CA is forwarded to this DN   }
  411.     telCAConferenceSplitMsg        = $00008000;                    {  conference split activity   }
  412.     telCAConferenceDropMsg        = $00010000;                    {  conference drop activity   }
  413.     telCAQueuedMsg                = $00020000;                    {  CA has been queued   }
  414.     telCAInUseMsg                = $00040000;                    {  CA is in use   }
  415.     telCACallPickupMsg            = $00080000;                    {  CA pickup activity  }
  416.     telCAPagingMsg                = $00100000;                    {  CA paging activity  }
  417.     telCAIntercomMsg            = $00200000;                    {  CA intercom activity  }
  418.     telCAModemToneMsg            = $00400000;                    {  modem tones detected  }
  419.     telCAFaxToneMsg                = $00800000;                    {  fax tones detected  }
  420.     telCAIdleMsg                = $01000000;                    {  CA is in idle state  }
  421.     telCASuccessiveAlertMsg        = $02000000;                    {  phone is alerting, one per ring  }
  422.     telCAUserUserInfoMsg        = $04000000;                    {  user to user information has arrrived  }
  423.                                                                 {  for this CA  }
  424.     telCAHandOffMsg                = $08000000;                    {  CA is ready for hand-off  }
  425.     telCAVoiceDetectedMsg        = $10000000;                    {  voice Detect related event  }
  426.     telCASilenceDetectedMsg        = $20000000;                    {  silence Detect related event  }
  427.     telCADigitsImmMsg            = $40000000;                    {  immidiate arrival of remote signaling digits  }
  428.     telCAOtherMsg                = $80000000;                    {  tool specific CA message  }
  429.     telAllCAMsgs                = $7FFFFFFF;                    {  mask to all non tool specific CA events  }
  430.  
  431.  
  432. TYPE
  433.     TELErr                                = OSErr;
  434.     TELFlags                            = LONGINT;
  435.  
  436. CONST
  437.     telNoMenus                    = $00010000;                    {  tells tool not to display any custom menus  }
  438.     telQuiet                    = $00020000;                    {  tells tool not to display any dialog boxes or alerts  }
  439.     telConfigChanged            = $00040000;                    {  notifies application that the config has changed  }
  440.  
  441.  
  442. TYPE
  443.     TELFeatureFlags                        = LONGINT;
  444.  
  445. CONST
  446.     pcmAvail                    = $00000001;                    {  true if PCM voice data accessible  }
  447.     hasHandset                    = $00000002;                    {  true if a phone handset is attached   }
  448.     hasSpeakerphone                = $00000004;                    {  true if a 2 way speakerphone is attached  }
  449.     canOnHookDial                = $00000008;                    {  can on-hook dial  }
  450.     hasRinger                    = $00000010;                    {  terminal has its own ringer  }
  451.     canSetDisplay                = $00000020;                    {  application can write to the display  }
  452.     hasKeypad                    = $00000040;                    {  attached phone has standard 12 key pad  }
  453.     hasVideo                    = $00000080;                    {  terminal has a videophone  }
  454.     hasOther                    = $00000100;                    {  reserved for future use  }
  455.     crossDNConference            = $00000200;                    {  can perform cross-DN conferences  }
  456.     hasSubaddress                = $00000400;                    {  attached network supports subaddressing  }
  457.     hasUserUserInfo                = $00000800;                    {  network supports user-to-user info  }
  458.     hasHandsetSoundStreams        = $00001000;                    {  sound streams are supported on the handset  }
  459.     hasIndHandset                = $00002000;                    {  handset can be accessed independently of the phone line  }
  460.     hasBuiltinSpeakerphone        = $00004000;                    {  speaker and microphone of the Mac can be used  }
  461.  
  462.  
  463. TYPE
  464.     TELTermRecordPtr = ^TELTermRecord;
  465.     TELTermRecord = RECORD
  466.         tRef:                    INTEGER;
  467.         featureFlags:            TELFeatureFlags;
  468.         handsetSpeakerVol:        INTEGER;
  469.         handsetMicVol:            INTEGER;
  470.         speakerphoneVol:        INTEGER;
  471.         speakerphoneMicVol:        INTEGER;
  472.         ringerVol:                INTEGER;
  473.         otherVol:                INTEGER;
  474.         ringerTypes:            INTEGER;
  475.         hasDisplay:                INTEGER;
  476.         displayRows:            INTEGER;
  477.         numDNs:                    INTEGER;
  478.         maxAllocCA:                INTEGER;
  479.         curAllocCA:                INTEGER;
  480.         builtinSpeakerVol:        INTEGER;
  481.         builtinSpeakerMicVol:    INTEGER;
  482.         reserved:                LONGINT;
  483.     END;
  484.  
  485.     TELTermPtr                            = ^TELTermRecord;
  486.     TELRecordPtr = ^TELRecord;
  487.     TELRecord = RECORD
  488.         procID:                    INTEGER;
  489.         flags:                    TELFlags;
  490.         reserved:                INTEGER;
  491.         refCon:                    LONGINT;
  492.         userData:                LONGINT;
  493.         defproc:                UniversalProcPtr;
  494.         config:                    Ptr;
  495.         oldConfig:                Ptr;
  496.         pTELTerm:                TELTermPtr;
  497.         telPrivate:                LONGINT;
  498.         reserved1:                LONGINT;
  499.         reserved2:                LONGINT;
  500.         pTELTermSize:            LONGINT;
  501.         version:                INTEGER;
  502.     END;
  503.  
  504.     TELPtr                                = ^TELRecord;
  505.     TELHandle                            = ^TELPtr;
  506.     TELDNFeatureFlags                    = LONGINT;
  507.  
  508. CONST
  509.     dndSub                        = $00000001;                    {  do not disturb subscribed  }
  510.     dndAvail                    = $00000002;                    {  do not disturb available  }
  511.     dndActive                    = $00000004;                    {  do not disturb active  }
  512.     voiceMailAccessSub            = $00000008;                    {  message waiting subscribed  }
  513.     voiceMailAccessAvail        = $00000010;                    {  message waiting available  }
  514.     voiceMailAccessActive        = $00000020;                    {  message waiting active  }
  515.     pagingSub                    = $00000040;                    {  paging is subscribed  }
  516.     pagingAvail                    = $00000080;                    {  paging is available  }
  517.     pagingActive                = $00000100;                    {  paging is active  }
  518.     intercomSub                    = $00000200;                    {  intercom is subscribed  }
  519.     intercomAvail                = $00000400;                    {  intercom is available  }
  520.     intercomActive                = $00000800;                    {  intercom is active  }
  521.     dnSelectSub                    = $00001000;                    {  DN select is subscribed  }
  522.     dnSelectAvail                = $00002000;                    {  DN select is available  }
  523.     dnSelectActive                = $00004000;                    {  DN is selected  }
  524.     callPickupSub                = $00008000;                    {  call pickup is subscribed  }
  525.     callPickupAvail                = $00010000;                    {  call pickup is available  }
  526.     dnInUse                        = $00020000;                    {  a CA is allocated for this DN  }
  527.     logicalDN                    = $00040000;                    {  this DN is not on this terminal  }
  528.     dnAccessible                = $00080000;                    {  commands can be sent to this DN  }
  529.     canInitiate                    = $00100000;                    {  an outgoing CA can be initiated  }
  530.     voiceMessageWaiting            = $00200000;                    {  voice mail waiting for this dn  }
  531.     hasDNSoundStreams            = $00400000;                    {  sound streams are supported on this DN  }
  532.     autoAnswerAvail                = $00800000;                    {  AutoAnswer is set for this DN  }
  533.     autoAnswerActive            = $01000000;                    {  AutoAnswer is currently applied to CA on this DN  }
  534.     tollSaverAvail                = $02000000;                    {  tollSaver is set for this DN  }
  535.     tollSaverActive                = $04000000;                    {  tollSaver is currently applied to CA on this DN  }
  536.  
  537.  
  538. TYPE
  539.     TELDNForwardFlags                    = LONGINT;
  540.  
  541. CONST
  542.     immediateForwardSub            = $00000001;                    {  immediate call forward subscribed  }
  543.     immediateForwardAvail        = $00000002;                    {  immediate call forward available  }
  544.     immediateForwardActive        = $00000004;                    {  immediate call forward active  }
  545.     busyForwardSub                = $00000008;                    {  forward on busy subscribed  }
  546.     busyForwardAvail            = $00000010;                    {  forward on busy available  }
  547.     busyForwardActive            = $00000020;                    {  forward on busy active  }
  548.     noAnswerForwardSub            = $00000040;                    {  no answer call forward subscribed  }
  549.     noAnswerForwardAvail        = $00000080;                    {  no answer call forward available  }
  550.     noAnswerForwardActive        = $00000100;                    {  no answer call forward active  }
  551.     busyNAForwardSub            = $00000200;                    {  busy & no answer call forward subscribed  }
  552.     busyNAForwardAvail            = $00000400;                    {  busy & no answer call forward available  }
  553.     busyNAForwardActive            = $00000800;                    {  busy & no answer call forward active  }
  554.  
  555.  
  556. TYPE
  557.     TELDNRecordPtr = ^TELDNRecord;
  558.     TELDNRecord = RECORD
  559.         dnRef:                    INTEGER;
  560.         dn:                        StringPtr;
  561.         dnPartyName:            StringPtr;
  562.         dnSubaddress:            StringPtr;
  563.         hTEL:                    TELHandle;
  564.         maxAllocCA:                INTEGER;
  565.         curAllocCA:                INTEGER;
  566.         dnType:                    INTEGER;
  567.         featureFlags:            TELDNFeatureFlags;
  568.         numPageIDs:                INTEGER;
  569.         numIntercomIDs:            INTEGER;
  570.         numPickupIDs:            INTEGER;
  571.         forwardFlags:            TELDNForwardFlags;
  572.         iForwardDN:                StringPtr;
  573.         iForwardSubaddress:        StringPtr;
  574.         iForwardPartyName:        StringPtr;
  575.         bForwardDN:                StringPtr;
  576.         bForwardSubaddress:        StringPtr;
  577.         bForwardPartyName:        StringPtr;
  578.         naForwardDN:            StringPtr;
  579.         naForwardSubaddress:    StringPtr;
  580.         naForwardPartyName:        StringPtr;
  581.         naForwardRings:            INTEGER;
  582.         telDNPrivate:            LONGINT;
  583.         refCon:                    LONGINT;
  584.         userData:                LONGINT;
  585.         reserved:                LONGINT;
  586.     END;
  587.  
  588.     TELDNPtr                            = ^TELDNRecord;
  589.     TELDNHandle                            = ^TELDNPtr;
  590.     TELCAFeatureFlags                    = LONGINT;
  591.  
  592. CONST
  593.     holdSub                        = $00000001;                    {  hold subscribed   }
  594.     holdAvail                    = $00000002;                    {  hold available   }
  595.     holdActive                    = $00000004;                    {  hold active   }
  596.     conferenceSub                = $00000008;                    {  conference subscribed  }
  597.     conferenceAvail                = $00000010;                    {  conference available  }
  598.     conferenceActive            = $00000020;                    {  conference active   }
  599.     conferenceDropSub            = $00000040;                    {  conference drop subscribed   }
  600.     conferenceDropAvail            = $00000080;                    {  a call to TELDrop will drop this  }
  601.                                                                 {  CA only from a conference  }
  602.     conferenceSplitSub            = $00000100;                    {  conference split subscribed   }
  603.     conferenceSplitAvail        = $00000200;                    {  conference split available for this CA  }
  604.     numToConferenceRequired        = $00000400;                    {  the number of CAs to be conferenced is  }
  605.                                                                 {  required in TELConfPrep   }
  606.     transferSub                    = $00000800;                    {  transfer subscribed   }
  607.     transferAvail                = $00001000;                    {  transfer available   }
  608.     transferActive                = $00002000;                    {  transfer active  }
  609.     caRelated                    = $00004000;                    {  this CA is the specified in some other CA's relatedCA field }
  610.  
  611.  
  612. TYPE
  613.     TELCAOtherFeatures                    = LONGINT;
  614.  
  615. CONST
  616.     callbackSub                    = $00000001;                    {  call back subscribed  }
  617.     callbackAvail                = $00000002;                    {  call back available  }
  618.     callbackActive                = $00000004;                    {  call back active   }
  619.     callbackClearSub            = $00000008;                    {  call back clearing subscribed  }
  620.     callbackNowSub                = $00000010;                    {  call back now subscribed  }
  621.     callbackNowAvail            = $00000020;                    {  call back now available   }
  622.     callbackBusy                = $00000040;                    {  call back on busy  }
  623.     callbackNoAnswer            = $00000080;                    {  call back on no answer  }
  624.     callbackReturnsRef            = $00000100;                    {  call back returns a reference  }
  625.     parkSub                        = $00000200;                    {  call park subscribed  }
  626.     parkAvail                    = $00000400;                    {  call park available  }
  627.     parkActive                    = $00000800;                    {  call park active  }
  628.     parkRetrieveSub                = $00001000;                    {  call park retrieve subscribed  }
  629.     parkRetrieveWithID            = $00002000;                    {  retrieve parked calls with IDs  }
  630.     parkWithReturnedID            = $00004000;                    {  park call to a specific remote ID  }
  631.     parkWithGivenID                = $00040000;                    {  for switch that requires ID for parking  }
  632.     rejectable                    = $00008000;                    {  CA is rejectable   }
  633.     deflectable                    = $00010000;                    {  CA is deflectable   }
  634.     acceptable                    = $00020000;                    {  CA is acceptable  }
  635.     voiceDetected                = $00080000;                    {  voice has been detected on this CA incase of  }
  636.                                                                 {  an incoming call  }
  637.     callAnswdTSRings            = $00100000;                    {  incoimng call was answered on TollSaver rings  }
  638.  
  639.  
  640. TYPE
  641.     TELCARecordPtr = ^TELCARecord;
  642.     TELCAPtr                            = ^TELCARecord;
  643.     TELCAHandle                            = ^TELCAPtr;
  644.     TELCARecord = RECORD
  645.         caRef:                    INTEGER;
  646.         hTELDN:                    TELDNHandle;
  647.         hTEL:                    TELHandle;
  648.         caState:                INTEGER;
  649.         relatedCA:                TELCAHandle;
  650.         connectTime:            LONGINT;                                {  can be used by application to keep track of connect time  }
  651.         intExt:                    INTEGER;
  652.         callType:                INTEGER;
  653.         dialType:                INTEGER;
  654.         bearerType:                INTEGER;
  655.         rate:                    INTEGER;
  656.         rmtDN:                    StringPtr;
  657.         rmtPartyName:            StringPtr;
  658.         rmtSubaddress:            StringPtr;
  659.         routeDN:                StringPtr;
  660.         routePartyName:            StringPtr;
  661.         routeSubaddress:        StringPtr;
  662.         priority:                INTEGER;
  663.         conferenceLimit:        INTEGER;
  664.         featureFlags:            TELCAFeatureFlags;
  665.         otherFeatures:            TELCAOtherFeatures;
  666.         telCAPrivate:            LONGINT;
  667.         refCon:                    LONGINT;
  668.         userData:                LONGINT;
  669.         reserved:                LONGINT;
  670.     END;
  671.  
  672. {  Constants for HandleType in structure above  }
  673.  
  674. CONST
  675.     telHandleType                = 0;                            {  feature requires a terminal handle  }
  676.     telDNHandleType                = 1;                            {  feature requires a DN handle  }
  677.     telCAHandleType                = 2;                            {  feature requires a CA handle  }
  678.  
  679.  
  680. TYPE
  681.     FeatureListPtr = ^FeatureList;
  682.     FeatureList = RECORD
  683.         featureID:                INTEGER;
  684.         featureName:            StringPtr;
  685.         handleType:                INTEGER;
  686.         nextFeature:            FeatureListPtr;
  687.     END;
  688.  
  689. {  CA MESSAGE STRUCTURES FOR MSGINFO  }
  690.     CAGenericMsgRecPtr = ^CAGenericMsgRec;
  691.     CAGenericMsgRec = RECORD
  692.         rmtDN:                    StringPtr;
  693.         rmtName:                StringPtr;
  694.         rmtSubaddress:            StringPtr;
  695.         dialType:                INTEGER;
  696.     END;
  697.  
  698.     CAUserUserInfoMsgRecPtr = ^CAUserUserInfoMsgRec;
  699.     CAUserUserInfoMsgRec = RECORD
  700.         userUserInfo:            StringPtr;
  701.     END;
  702.  
  703.     CAConfMsgRecPtr = ^CAConfMsgRec;
  704.     CAConfMsgRec = RECORD
  705.         relatedCA:                TELCAHandle;
  706.     END;
  707.  
  708.     CATransfMsgRecPtr = ^CATransfMsgRec;
  709.     CATransfMsgRec = RECORD
  710.         rmtDN:                    StringPtr;
  711.         rmtName:                StringPtr;
  712.         rmtSubaddress:            StringPtr;
  713.         dialType:                INTEGER;
  714.         prepCA:                    TELCAHandle;
  715.     END;
  716.  
  717.     TelephoneTermMsgProcPtr = ProcPtr;  { PROCEDURE TelephoneTermMsg(hTEL: TELHandle; msg: LONGINT; mtype: INTEGER; value: INTEGER; globals: LONGINT); }
  718.  
  719.     TelephoneDNMsgProcPtr = ProcPtr;  { PROCEDURE TelephoneDNMsg(hTELDN: TELDNHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; rmtDN: Str255; rmtName: Str255; rmtSubaddress: Str255; globals: LONGINT); }
  720.  
  721.     TelephoneCAMsgProcPtr = ProcPtr;  { PROCEDURE TelephoneCAMsg(hTELCA: TELCAHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; Msginfo: Ptr; globals: LONGINT); }
  722.  
  723.     TelephoneChooseIdleProcPtr = ProcPtr;  { PROCEDURE TelephoneChooseIdle; }
  724.  
  725.     TelephoneTermMsgUPP = UniversalProcPtr;
  726.     TelephoneDNMsgUPP = UniversalProcPtr;
  727.     TelephoneCAMsgUPP = UniversalProcPtr;
  728.     TelephoneChooseIdleUPP = UniversalProcPtr;
  729.  
  730. CONST
  731.     uppTelephoneTermMsgProcInfo = $0000EBC0;
  732.     uppTelephoneDNMsgProcInfo = $003FEBC0;
  733.     uppTelephoneCAMsgProcInfo = $0003EBC0;
  734.     uppTelephoneChooseIdleProcInfo = $00000000;
  735.  
  736. FUNCTION NewTelephoneTermMsgProc(userRoutine: TelephoneTermMsgProcPtr): TelephoneTermMsgUPP;
  737.     {$IFC NOT GENERATINGCFM }
  738.     INLINE $2E9F;
  739.     {$ENDC}
  740.  
  741. FUNCTION NewTelephoneDNMsgProc(userRoutine: TelephoneDNMsgProcPtr): TelephoneDNMsgUPP;
  742.     {$IFC NOT GENERATINGCFM }
  743.     INLINE $2E9F;
  744.     {$ENDC}
  745.  
  746. FUNCTION NewTelephoneCAMsgProc(userRoutine: TelephoneCAMsgProcPtr): TelephoneCAMsgUPP;
  747.     {$IFC NOT GENERATINGCFM }
  748.     INLINE $2E9F;
  749.     {$ENDC}
  750.  
  751. FUNCTION NewTelephoneChooseIdleProc(userRoutine: TelephoneChooseIdleProcPtr): TelephoneChooseIdleUPP;
  752.     {$IFC NOT GENERATINGCFM }
  753.     INLINE $2E9F;
  754.     {$ENDC}
  755.  
  756. PROCEDURE CallTelephoneTermMsgProc(hTEL: TELHandle; msg: LONGINT; mtype: INTEGER; value: INTEGER; globals: LONGINT; userRoutine: TelephoneTermMsgUPP);
  757.     {$IFC NOT GENERATINGCFM}
  758.     INLINE $205F, $4E90;
  759.     {$ENDC}
  760.  
  761. PROCEDURE CallTelephoneDNMsgProc(hTELDN: TELDNHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; rmtDN: Str255; rmtName: Str255; rmtSubaddress: Str255; globals: LONGINT; userRoutine: TelephoneDNMsgUPP);
  762.     {$IFC NOT GENERATINGCFM}
  763.     INLINE $205F, $4E90;
  764.     {$ENDC}
  765.  
  766. PROCEDURE CallTelephoneCAMsgProc(hTELCA: TELCAHandle; Msg: LONGINT; mtype: INTEGER; value: INTEGER; Msginfo: Ptr; globals: LONGINT; userRoutine: TelephoneCAMsgUPP);
  767.     {$IFC NOT GENERATINGCFM}
  768.     INLINE $205F, $4E90;
  769.     {$ENDC}
  770.  
  771. PROCEDURE CallTelephoneChooseIdleProc(userRoutine: TelephoneChooseIdleUPP);
  772.     {$IFC NOT GENERATINGCFM}
  773.     INLINE $205F, $4E90;
  774.     {$ENDC}
  775. FUNCTION InitTEL: TELErr;
  776. FUNCTION TELGetInfo(hTEL: TELHandle): TELErr;
  777. FUNCTION TELOpenTerm(hTEL: TELHandle): TELErr;
  778. FUNCTION TELResetTerm(hTEL: TELHandle): TELErr;
  779. FUNCTION TELCloseTerm(hTEL: TELHandle): TELErr;
  780. FUNCTION TELTermMsgHand(hTEL: TELHandle; eventMask: LONGINT; msgProc: TelephoneTermMsgUPP; globals: LONGINT): TELErr;
  781. FUNCTION TELClrTermMsgHand(hTEL: TELHandle; msgProc: TelephoneTermMsgUPP): TELErr;
  782. FUNCTION TELTermEventsSupp(hTEL: TELHandle; VAR eventMask: LONGINT): TELErr;
  783. FUNCTION TELGetProcID(VAR name: Str255): INTEGER;
  784. FUNCTION TELNew(procID: INTEGER; flags: TELFlags; refCon: LONGINT; userData: LONGINT): TELHandle;
  785. FUNCTION TELNewWithResult(procID: INTEGER; flags: TELFlags; refCon: LONGINT; userData: LONGINT; VAR error: TELErr): TELHandle;
  786. FUNCTION TELDefault(VAR theConfig: Ptr; procID: INTEGER; allocate: BOOLEAN): TELErr;
  787. FUNCTION TELValidate(hTEL: TELHandle): BOOLEAN;
  788. FUNCTION TELGetConfig(hTEL: TELHandle): Ptr;
  789. FUNCTION TELSetConfig(hTEL: TELHandle; thePtr: Ptr): INTEGER;
  790. FUNCTION TELChoose(VAR hTEL: TELHandle; where: Point; idleProc: TelephoneChooseIdleProcPtr): TELErr;
  791. FUNCTION TELSetupPreflight(procID: INTEGER; VAR magicCookie: LONGINT): Handle;
  792. PROCEDURE TELSetupSetup(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR magicCookie: LONGINT);
  793. FUNCTION TELSetupFilter(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR theEvent: EventRecord; VAR theItem: INTEGER; VAR magicCookie: LONGINT): BOOLEAN;
  794. PROCEDURE TELSetupItem(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR theItem: INTEGER; VAR magicCookie: LONGINT);
  795. PROCEDURE TELSetupCleanup(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; VAR magicCookie: LONGINT);
  796. PROCEDURE TELSetupXCleanup(procID: INTEGER; theConfig: Ptr; count: INTEGER; theDialog: DialogPtr; OKed: BOOLEAN; VAR magicCookie: LONGINT);
  797. PROCEDURE TELSetupPostflight(procID: INTEGER);
  798. FUNCTION TELDispose(hTEL: TELHandle): TELErr;
  799. FUNCTION TELCountDNs(hTEL: TELHandle; dnType: INTEGER; physical: BOOLEAN): INTEGER;
  800. FUNCTION TELDNLookupByIndex(hTEL: TELHandle; dnType: INTEGER; physical: BOOLEAN; index: INTEGER; VAR hTELDN: TELDNHandle): TELErr;
  801. FUNCTION TELDNLookupByName(hTEL: TELHandle; DN: Str255; VAR hTELDN: TELDNHandle): TELErr;
  802. FUNCTION TELDNSelect(hTELDN: TELDNHandle; select: BOOLEAN): TELErr;
  803. FUNCTION TELDNDispose(hTELDN: TELDNHandle): TELErr;
  804. FUNCTION TELGetDNInfo(hTELDN: TELDNHandle): TELErr;
  805. FUNCTION TELGetDNFlags(hTELDN: TELDNHandle; VAR dnFeatureFlags: LONGINT; VAR dnForwardFlags: LONGINT): TELErr;
  806. FUNCTION TELDNMsgHand(hTELDN: TELDNHandle; allDNs: BOOLEAN; eventMask: LONGINT; msgProc: TelephoneDNMsgProcPtr; globals: LONGINT): TELErr;
  807. FUNCTION TELClrDNMsgHand(hTELDN: TELDNHandle; msgProc: TelephoneDNMsgProcPtr): TELErr;
  808. FUNCTION TELDNEventsSupp(hTELDN: TELDNHandle; VAR eventMask: LONGINT): TELErr;
  809. FUNCTION TELCountCAs(hTELDN: TELDNHandle; internalExternal: INTEGER): INTEGER;
  810. FUNCTION TELCALookup(hTELDN: TELDNHandle; internalExternal: INTEGER; index: INTEGER; VAR hTELCA: TELCAHandle): TELErr;
  811. FUNCTION TELCADispose(hTELCA: TELCAHandle): TELErr;
  812. FUNCTION TELGetCAState(hTELCA: TELCAHandle; VAR state: INTEGER): TELErr;
  813. FUNCTION TELGetCAFlags(hTELCA: TELCAHandle; VAR caFeatureFlags: LONGINT; VAR caOtherFeatures: LONGINT): TELErr;
  814. FUNCTION TELGetCAInfo(hTELCA: TELCAHandle): TELErr;
  815. FUNCTION TELCAMsgHand(hTELDN: TELDNHandle; eventMask: LONGINT; msgProc: TelephoneCAMsgProcPtr; globals: LONGINT): TELErr;
  816. FUNCTION TELClrCAMsgHand(hTELDN: TELDNHandle; msgProc: TelephoneCAMsgProcPtr): TELErr;
  817. FUNCTION TELCAEventsSupp(hTELDN: TELDNHandle; VAR eventMask: LONGINT): TELErr;
  818. FUNCTION TELSetupCall(hTELDN: TELDNHandle; VAR hTELCA: TELCAHandle; destDN: Str255; destName: Str255; destSubaddress: Str255; userUserInfo: Str255; bearerType: INTEGER; rate: INTEGER): TELErr;
  819. FUNCTION TELConnect(hTELCA: TELCAHandle): TELErr;
  820. FUNCTION TELDialDigits(hTELCA: TELCAHandle; digits: Str255): TELErr;
  821. FUNCTION TELAcceptCall(hTELCA: TELCAHandle): TELErr;
  822. FUNCTION TELRejectCall(hTELCA: TELCAHandle; reason: INTEGER): TELErr;
  823. FUNCTION TELDeflectCall(hTELCA: TELCAHandle; rmtDN: Str255; rmtName: Str255; rmtSubaddress: Str255): TELErr;
  824. FUNCTION TELAnswerCall(hTELCA: TELCAHandle): TELErr;
  825. FUNCTION TELDrop(hTELCA: TELCAHandle; userUserInfo: Str255): TELErr;
  826. FUNCTION TELHold(hTELCA: TELCAHandle): TELErr;
  827. FUNCTION TELRetrieve(hTELCA: TELCAHandle): TELErr;
  828. FUNCTION TELConferencePrep(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle; numToConference: INTEGER): TELErr;
  829. FUNCTION TELConferenceEstablish(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle): TELErr;
  830. FUNCTION TELConferenceSplit(hTELCA: TELCAHandle): TELErr;
  831. FUNCTION TELTransferPrep(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle): TELErr;
  832. FUNCTION TELTransferEstablish(hTELCA1: TELCAHandle; hTELCA2: TELCAHandle): TELErr;
  833. FUNCTION TELTransferBlind(hTELCA: TELCAHandle; rmtDN: Str255; rmtName: Str255; rmtSubaddress: Str255): TELErr;
  834. FUNCTION TELForwardSet(hTELDN: TELDNHandle; forwardDN: Str255; forwardName: Str255; forwardSubaddress: Str255; forwardType: INTEGER; numrings: INTEGER): TELErr;
  835. FUNCTION TELForwardClear(hTELDN: TELDNHandle; forwardType: INTEGER): TELErr;
  836. FUNCTION TELCallbackSet(hTELCA: TELCAHandle; VAR callbackRef: INTEGER): TELErr;
  837. FUNCTION TELCallbackClear(hTEL: TELHandle; callbackRef: INTEGER): TELErr;
  838. FUNCTION TELCallbackNow(hTELCA: TELCAHandle; callbackRef: INTEGER): TELErr;
  839. FUNCTION TELDNDSet(hTELDN: TELDNHandle; dndType: INTEGER): TELErr;
  840. FUNCTION TELDNDClear(hTELDN: TELDNHandle; dndType: INTEGER): TELErr;
  841. FUNCTION TELCallPickup(hTELCA: TELCAHandle; pickupDN: Str255; pickupGroupID: INTEGER): TELErr;
  842. FUNCTION TELParkCall(hTELCA: TELCAHandle; VAR parkRetrieveID: StringPtr; parkID: Str255): TELErr;
  843. FUNCTION TELRetrieveParkedCall(hTELCA: TELCAHandle; parkRetrieveID: Str255): TELErr;
  844. FUNCTION TELVoiceMailAccess(hTELCA: TELCAHandle): TELErr;
  845. FUNCTION TELPaging(hTELCA: TELCAHandle; pageID: INTEGER): TELErr;
  846. FUNCTION TELIntercom(hTELCA: TELCAHandle; intercomID: INTEGER): TELErr;
  847. FUNCTION TELOtherFeatureList(hTEL: TELHandle; VAR fList: FeatureListPtr): TELErr;
  848. FUNCTION TELOtherFeatureImplement(hTEL: TELHandle; theHandle: Handle; featureID: INTEGER): TELErr;
  849. FUNCTION TELToolFunctions(hTEL: TELHandle; msgcode: INTEGER; VAR supportsIt: BOOLEAN): TELErr;
  850. FUNCTION TELOtherFunction(hTEL: TELHandle; paramblock: Ptr; size: LONGINT): TELErr;
  851. FUNCTION TELGetHooksw(hTEL: TELHandle; hookType: INTEGER; VAR offHook: BOOLEAN): TELErr;
  852. FUNCTION TELSetHooksw(hTEL: TELHandle; hookType: INTEGER; offHook: BOOLEAN): TELErr;
  853. FUNCTION TELGetVolume(hTEL: TELHandle; volType: INTEGER; VAR level: INTEGER; VAR volState: INTEGER): TELErr;
  854. FUNCTION TELSetVolume(hTEL: TELHandle; volType: INTEGER; VAR level: INTEGER; volState: INTEGER): TELErr;
  855. FUNCTION TELAlert(hTEL: TELHandle; VAR level: INTEGER; alertPattern: INTEGER): TELErr;
  856. FUNCTION TELGetDisplay(hTEL: TELHandle; index: INTEGER; VAR displayMode: INTEGER; VAR text: StringPtr): TELErr;
  857. FUNCTION TELSetDisplay(hTEL: TELHandle; index: INTEGER; displayMode: INTEGER; text: Str255): TELErr;
  858. PROCEDURE TELIdle(hTEL: TELHandle);
  859. PROCEDURE TELActivate(hTEL: TELHandle; activate: BOOLEAN);
  860. PROCEDURE TELResume(hTEL: TELHandle; resume: BOOLEAN);
  861. FUNCTION TELMenu(hTEL: TELHandle; menuID: INTEGER; item: INTEGER): BOOLEAN;
  862. PROCEDURE TELEvent(hTEL: TELHandle; {CONST}VAR theEvent: EventRecord);
  863. PROCEDURE TELGetToolName(procID: INTEGER; VAR name: Str255);
  864. FUNCTION TELGetVersion(hTEL: TELHandle): Handle;
  865. FUNCTION TELGetTELVersion: INTEGER;
  866. FUNCTION TELIntlToEnglish(hTEL: TELHandle; inputPtr: Ptr; VAR outputPtr: Ptr; language: INTEGER): TELErr;
  867. FUNCTION TELEnglishToIntl(hTEL: TELHandle; inputPtr: Ptr; VAR outputPtr: Ptr; language: INTEGER): TELErr;
  868. FUNCTION TELGetDNSoundInput(hTELDN: TELDNHandle; VAR deviceName: Str255): TELErr;
  869. FUNCTION TELDisposeDNSoundInput(hTELDN: TELDNHandle; deviceName: Str255): TELErr;
  870. FUNCTION TELGetDNSoundOutput(hTELDN: TELDNHandle; VAR SndOut: Component): TELErr;
  871. FUNCTION TELDisposeDNSoundOutput(hTELDN: TELDNHandle; SndOut: Component): TELErr;
  872. FUNCTION TELGetHSSoundInput(termHand: TELHandle; VAR deviceName: Str255): TELErr;
  873. FUNCTION TELDisposeHSSoundInput(termHand: TELHandle; deviceName: Str255): TELErr;
  874. FUNCTION TELGetHSSoundOutput(termHand: TELHandle; VAR SndOut: Component): TELErr;
  875. FUNCTION TELDisposeHSSoundOutput(termHand: TELHandle; SndOut: Component): TELErr;
  876. FUNCTION TELDNSetAutoAnswer(hTELDN: TELDNHandle; AutoAnswerOn: BOOLEAN): TELErr;
  877. FUNCTION TELDNTollSaverControl(hTELDN: TELDNHandle; QuickAnswer: BOOLEAN): TELErr;
  878. FUNCTION TELSetIndHSConnect(termHand: TELHandle; Connect: BOOLEAN): TELErr;
  879. FUNCTION TELGetIndHSConnect(termHand: TELHandle; VAR Connect: BOOLEAN): TELErr;
  880. FUNCTION TELCAVoiceDetect(hTELCA: TELCAHandle; VoiceDetectOn: BOOLEAN): TELErr;
  881. FUNCTION TELCASilenceDetect(hTELCA: TELCAHandle; DetectOn: BOOLEAN; Period: LONGINT): TELErr;
  882. FUNCTION TELGetTelNewErr: TELErr;
  883. FUNCTION TELDNSetDTMF(hTELDN: TELDNHandle; dtmfOn: BOOLEAN): TELErr;
  884. FUNCTION TELDNGetDTMF(hTELDN: TELDNHandle; VAR dtmfOn: BOOLEAN): TELErr;
  885. FUNCTION TELHSSetDTMF(termHand: TELHandle; dtmfOn: BOOLEAN): TELErr;
  886. FUNCTION TELHSGetDTMF(termHand: TELHandle; VAR dtmfOn: BOOLEAN): TELErr;
  887. FUNCTION TELGetDNStatus(hTELDN: TELDNHandle; VAR inUse: LONGINT): TELErr;
  888. FUNCTION TELGetDNProgressDet(hTELDN: TELDNHandle; selector: LONGINT; VAR prgDetOn: BOOLEAN): TELErr;
  889. FUNCTION TELSetDNProgressDet(hTELDN: TELDNHandle; selector: LONGINT; prgDetOn: BOOLEAN): TELErr;
  890. {$ENDC}
  891. {$ALIGN RESET}
  892. {$POP}
  893.  
  894. {$SETC UsingIncludes := TelephonesIncludes}
  895.  
  896. {$ENDC} {__TELEPHONES__}
  897.  
  898. {$IFC NOT UsingIncludes}
  899.  END.
  900. {$ENDC}
  901.